<?php

/**
 * LEAGUEMan
 * 
 * Copyright (C) 2007 Marko Bischof
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

?>

<form action="index2.php" method="post" name="adminForm">
	<table cellpadding="4" cellspacing="0" border="0" width="100%">
		<tr>
			<td width="100%" class="sectionname" colspan="2">
				Lineup <?php echo $this->match->getTeam1()->getName();?> - <?php echo $this->match->getTeam2()->getName();?>
			</td>
			<td>
				<fieldset>
					<legend>Teamswitch</legend>
					<?php echo $this->teamlist; ?>
				</fieldset>
			</td>
		</tr>
	</table>
	
	<table class="adminlist">
		<tr>
			<th width="1%">#</th>
			<th width="99%" class="title">Player</th>
		</tr>
	<?php $k = 0; ?>
	<?php foreach($this->players AS $player):?>
	<?php
			if(in_array($player->player_id, $this->rows)){
				$checked = 'checked="checked"';
			} else{
				$checked = '';
			}
	?>
			<tr class="<?php echo "row$k"; ?>">
				<td width="1%" align="center">
					<input type="checkbox" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $player->player_id; ?>" <?php echo $checked; ?> onclick="isChecked(this.checked);" />
				</td>
				<td align="left"><?php echo $player->player_name;?></td>
			</tr>
	<?php 	$k = 1 - $k; ?>
	<?php endforeach ?>
	</table>
	
	<input type="hidden" name="option" value="com_leagueman" />
	<input type="hidden" name="act" value="lineup" />
	<input type="hidden" name="task" value="" />
	<input type="hidden" name="boxchecked" value="0" />
</form>